$(function() {
    $.ajax({
        url: "http://jx.xuzhixiang.top/ap/api/productlist.php",
        type: "get",
        data: { uid: 69007 },
        success: function(res) {
            console.log(res);

            let wtl = document.querySelector("#gou");
            let element = "";
            for (var i = 0; i < res.data.length; i++) {
                element += `
                 <li>
                 <a href="detail.html?id=${res.data[i].pid}" target="_blank"><img src="${res.data[i].pimg}"></a>
                 <a href=""><span>${res.data[i].pname}</span></a>
                  <p>129元</p>
                 </li>
                 `

            }

            wtl.innerHTML = element;
        }
    });
});